XunZhangManager = {}

XunZhangManager.update = function()
end
XunZhangManager.getOnDecorates = function(gid)
  local seq = {}
  for k,v in pairs(UserData.userinfo.host.store.decor.u) do
    if gid==v.g then
      seq[k] = v
    end
  end
  return seq
end
XunZhangManager.getAllDecorates = function()
  local seq = {}
  for k,v in pairs(UserData.userinfo.host.store.decor.u) do
    seq[k] = v
  end
  for k,v in pairs(UserData.userinfo.host.store.decor.b) do
    seq[k] = v
  end
  for k,v in pairs(UserData.userinfo.host.store.decor.m) do
    seq[k] = v
  end
  return seq
end

XunZhangManager.getDecorateInfoById = function(xzid)
  return UserData.config.models.Decorate[xzid]
end
XunZhangManager.getBagDecorates = function()
  return UserData.userinfo.host.store.decor.b
end
XunZhangManager.createDecorateTip = function(xzIndex)
  local XZLevelIndex  = {green=1, blue=11, purple=21, orange=31}
  local xzs = XunZhangManager.getAllDecorates()
  local xz = xzs[tostring(xzIndex)]
  local info = XunZhangManager.getDecorateInfoById(xz.d)
  TypeCast(l:getChildByTag(1010), "CCLabelTTF"):setString(info.name)
  
  local level =  
  TypeCast(l:getChildByTag(1011), "CCLabelTTF"):setString(info.name)
end
